home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 6 / 006.d81 / snoopy calendar (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  7KB  |  295 lines

  1. 0 dim m(30):printchr$(14)
  2. 1 print"[147]":poke53281,0:poke53280,5
  3. 2 print"[212]his program requires a printer.  [201]f":print"you do not have one, ";
  4. 3 print"please press       <[210][197][212][213][210][206]>."
  5. 4 poke198,0:wait198,1:geta$:ifa$=chr$(13)then63000
  6. 10 print"[147] [212]his program is to print a calendar of the year specified."
  7. 20 print:print"[197]nter the year you want printed--";:inputy
  8. 30 num$=str$(y):iflen(num$)<>5then20
  9. 90 y5=y-(100*int(y/100)):ify5/4<>int(y5/4)then110
  10. 100 l4=1
  11. 110 print
  12. 120 e=int((y-1000)/1000)
  13. 130 y1=y+e
  14. 140 z=int(y1/28)
  15. 150 y2=y1-(z*28)
  16. 160 ify2=0then300
  17. 170 ify2>14then190
  18. 180 ony2goto200,220,260,300,320,200,220,260,280,300,320,200,240
  19. 190 ony2-14goto260,280,320,200,220,240,280,300,320,200,240,260,280
  20. 200 d=0
  21. 210 goto340
  22. 220 d=-1
  23. 230 goto340
  24. 240 d=-2
  25. 250 goto340
  26. 260 d=-3
  27. 270 goto340
  28. 280 d=-4
  29. 290 goto340
  30. 300 d=-5
  31. 310 goto340
  32. 320 d=-6
  33. 340 print"[147] [212]his program will print out a picture"
  34. 345 print"of snoopy followed by whatever two"
  35. 350 print"statements you would like, then "
  36. 360 print"a calendar will be printed."
  37. 370 print:print:print
  38. 380 print"[200]ow many lines of message 0,1, or 2";:poke198,0:wait198,1:getx1:printx1
  39. 390 print
  40. 400 ifx1=0then500
  41. 410 ifx1=1then470
  42. 420 ifx1=2then480
  43. 430 ifx1>2then2010
  44. 470 print"[197]nter the line you want printed.":inputr$:goto500
  45. 480 print"[197]nter the 1st line":inputr$
  46. 485 print"[197]nter the 2nd line":inputs$
  47. 500 open4,4,7:forq=1to9:print#4:next
  48. 510 x1$="[216]":x2$="[216][216]":x3$="[216][216][216]":x4$="[216][216][216][216]":x5$="[216][216][216][216][216]"
  49. 520 s1$=" ":s2$="  ":s3$="   ":s4$="    "
  50. 530 s5$="     ":s6$="      ":s7$="       "
  51. 540 r%=len(r$):r%=40-(r%/2)
  52. 550 s%=len(s$):s%=40-(s%/2)
  53. 600 w1=10
  54. 610 print#4,spc(w1)s6$s6$s3$x4$
  55. 620 print#4,spc(w1)s6$s6$s2$x1$s4$x2$
  56. 630 print#4,spc(w1)s6$s6$s1$x1$s2$"***"s2$x1$s6$s6$s6$x4$x1$
  57. 640 print#4,spc(w1)s6$s6$x1$s2$"*****"s2$x1$s6$s6$s2$x3$s5$x2$
  58. 650 print#4,spc(w1)s6$s3$x4$s1$"*******"s2$x3$s6$s1$x4$s6$s4$x2$
  59. 660 print#4,spc(w1)s6$s1$x2$s3$x1$" ******   "x4$x5$s6$s6$s5$x2$" xxx"
  60. 670 print#4,spc(w1)s5$x2$s6$s1$"x ****   "x1$s6$s6$s6$s6$s4$"x***x"
  61. 680 print#4,spc(w1)s4$x1$s6$s3$x2$s4$x2$s6$s1$x1$s6$s6$s5$s5$"x***x"
  62. 690 print#4,spc(w1)s3$x1$s6$s4$"//xxxx"s6$s3$x1$spc(22)x4$
  63. 700 print#4,spc(w1)s2$x1$s6$s4$"//    x"spc(30)x2$
  64. 710 print#4,spc(w1)s1$x1$s6$s4$"//     x"spc(11)x5$x5$x5$x3$"/"
  65. 720 print#4,spc(w1)s1$x1$s6$x3$"//"s5$x1$spc(11)x1$
  66. 730 print#4,spc(w1)s1$x1$s5$x1$s3$x1$s6$x1$spc(10)x1$
  67. 740 print#4,spc(w1)s1$x1$s5$x1$s4$x1$s5$x1$spc(9)x1$
  68. 750 print#4,spc(w1)s2$x1$s4$x1$s4$x1$s5$x1$spc(9)x1$spc(20)x2$
  69. 760 print#4,spc(w1)s2$x1$s5$x1$s3$x1$s5$x1$spc(9)x1$spc(17)x3$"  xx"
  70. 770 print#4,spc(w1)s3$x1$s5$x3$s6$s1$x1$s5$s4$x1$spc(15)"x  x x  x"
  71. 780 print#4,spc(w1)s3$x1$s5$s3$s6$s1$x1$s5$s5$x1$spc(14)"xx x  xxxx"
  72. 790 print#4,spc(w1)s4$x1$s5$s5$s5$x1$s5$s5$x4$x4$"/"s5$x2$s3$"xx  x"
  73. 800 print#4,spc(w1)s5$x2$spc(14)x2$spc(15)x1$s5$x1$"    x  xx"
  74. 810 print#4,spc(w1)s7$x2$spc(14)x4$s4$x3$x3$"/"s5$"x     xxxx"
  75. 820 print#4,spc(w1+9)x3$spc(15)"xx***"spc(10)x1$s5$x1$
  76. 830 print#4,spc(w1+12)x5$x5$x4$" *   *"spc(9)x1$s5$x1$
  77. 840 print#4,spc(w1+26)"*---* x"s7$x1$s5$x1$
  78. 850 print#4,spc(w1+25)"*-* *   xxx   x     x"
  79. 860 print#4,spc(w1+25)"*- *"s7$x4$s4$x1$
  80. 870 print#4,spc(w1+24)"*- *x"s5$s6$x4$
  81. 880 print#4,spc(w1+24)"*- *x  x"spc(12)x3$
  82. 890 print#4,spc(w1+23)"*- *x    x"spc(13)x2$
  83. 900 print#4,spc(w1+23)"*- *xx    x"spc(13)x1$
  84. 910 print#4,spc(w1+22)"*  *x* x    x"spc(13)x1$
  85. 920 print#4,spc(w1+22)"*  *x * x    x"spc(13)x1$
  86. 930 print#4,spc(w1+21)"*  * x**  x   xxxx"spc(10)x1$
  87. 940 print#4,spc(w1+21)"*  * x**  xx     x"spc(10)x1$
  88. 950 print#4,spc(w1+20)"*  ** x** x     xx"spc(10)x1$
  89. 960 print#4,spc(w1+20)"*  **  x*  xxx   x"spc(9)x1$
  90. 970 print#4,spc(w1+19)"*  **    xx   xxxx"spc(9)x3$
  91. 980 print#4,spc(w1+18)"*  * *      xxxx"s7$x1$s6$x1$
  92. 990 print#4,spc(w1+17)"*   * *"spc(10)x1$s6$x1$s6$x1$
  93. 1000 print#4,spc(w1)s2$"=======*******   * *"spc(12)x1$s6$x1$s7$x4$x4$"/"
  94. 1010 print#4,spc(w1)s2$"       *         * *"spc(7)"/xxxxx"s7$x4$x5$"/      )"
  95. 1020 print#4,spc(w1)s4$"=====**********  *"s6$x1$spc(23)")  /  )"
  96. 1030 print#4,spc(w1)s6$"====*"s6$s3$"*"s6$x1$spc(16)"/  /    )"x5$
  97. 1040 print#4,spc(w1)s2$"=========**********"s6$s2$x5$x5$x5$x5$x4$
  98. 1050 print#4:print#4
  99. 1060 print#4,spc(r%)r$
  100. 1070 print#4
  101. 1090 print#4,spc(s%)s$
  102. 1100 print#4:print#4:print#4
  103. 1130 h(1)=int(y/1000)
  104. 1140 h(2)=int(y/100)-(h(1)*10)
  105. 1150 h(3)=int(y/10)-(h(1)*100+h(2)*10)
  106. 1160 h(4)=y-(h(1)*1000+h(2)*100+h(3)*10)
  107. 1170 forf=1to4:print#4:printf,h(f)+1
  108. 1180 onh(f)+1gosub2020,2110,2200,2290,2380,2470,2560,2650,2740,2830
  109. 1190 nextf
  110. 1200 rem             dim m(30)
  111. 1210 ifl4=1then1240
  112. 1220 j6=26
  113. 1230 goto1250
  114. 1240 j6=13
  115. 1250 forn=1toj6
  116. 1260 readm(n)
  117. 1270 nextn
  118. 1280 ifj6=13then1340
  119. 1290 n=0
  120. 1300 forn4=14to26
  121. 1310 n=n+1
  122. 1320 m(n)=m(n4)
  123. 1330 nextn4
  124. 1340 forn=2to13
  125. 1350 fori=1to5
  126. 1360 print#4
  127. 1370 nexti
  128. 1380 s=s+m(n-1)
  129. 1390 print#4,spc(10);"**";s;
  130. 1400 fori=1to19
  131. 1410 print#4,"*";
  132. 1420 nexti
  133. 1430 onn-1goto1440,1460,1480,1500,1520,1540,1560,1580,1600,1620,1640,1660
  134. 1440 print#4,"    [202]anuary  ";
  135. 1450 goto1670
  136. 1460 print#4,"  [198]ebruary  ";
  137. 1470 goto1670
  138. 1480 print#4,"   [205]arch    ";
  139. 1490 goto1670
  140. 1500 print#4,"   [193]pril    ";
  141. 1510 goto1670
  142. 1520 print#4,"   [205]ay     ";
  143. 1530 goto1670
  144. 1540 print#4,"   [202]une    ";
  145. 1550 goto1670
  146. 1560 print#4,"   [202]uly    ";
  147. 1570 goto1670
  148. 1580 print#4,"   [193]ugust  ";
  149. 1590 goto1670
  150. 1600 print#4," [211]eptember ";
  151. 1610 goto1670
  152. 1620 print#4,"  [207]ctober  ";
  153. 1630 goto1670
  154. 1640 print#4,"  [206]ovember ";
  155. 1650 goto1670
  156. 1660 print#4,"  [196]ecember ";
  157. 1670 fori=1to19
  158. 1680 print#4,"*";
  159. 1690 nexti
  160. 1700 ifl4=1then1730
  161. 1710 print#4,365-s;"**"
  162. 1720 goto1740
  163. 1730 print#4,366-s;"**"
  164. 1740 print#4
  165. 1750 print#4,spc(10);"     [211]        [205]        [212]        [215]        [212]        [198]";
  166. 1752 print#4,"        [211]"
  167. 1760 print#4
  168. 1770 print#4,spc(10);
  169. 1780 fori=1to62
  170. 1790 print#4,"*";
  171. 1800 next i
  172. 1810 forw=1to6
  173. 1820 print#4
  174. 1830 print#4,"              ";
  175. 1840 forg=1to7
  176. 1850 d=d+1
  177. 1860 d2=d-s
  178. 1870 ifd2>m(n)then1940
  179. 1880 ifd2<1thenprint#4,"  ";:goto1900
  180. 1890 print#4,d2;:rem left$(str$(d2),len(str$(d2)-1));
  181. 1900 gosub2930
  182. 1910 next g
  183. 1920 ifd2=m(n)then1950
  184. 1930 print#4:nextw
  185. 1940 d=d-g
  186. 1950 print#4,"   ";:nextn
  187. 1960 data0,31,29,31,30,31,30,31,31,30,31,30,31
  188. 1970 data0,31,28,31,30,31,30,31,31,30,31,30,31
  189. 1980 forq2=1to15
  190. 1990 print#4
  191. 2000 nextq2
  192. 2010 goto2970
  193. 2020 w2=16+7*f
  194. 2030 print#4,spc(w2)"  000  "
  195. 2040 print#4,spc(w2)" 0   0 "
  196. 2050 print#4,spc(w2)" 0   0 "
  197. 2060 print#4,spc(w2)" 0   0 "
  198. 2070 print#4,spc(w2)" 0   0 "
  199. 2080 print#4,spc(w2)" 0   0 "
  200. 2090 print#4,spc(w2)"  000  "
  201. 2100 return
  202. 2110 w2=16+7*f
  203. 2120 print#4,spc(w2)"   1   "
  204. 2130 print#4,spc(w2)"  11   "
  205. 2140 print#4,spc(w2)"   1   "
  206. 2150 print#4,spc(w2)"   1   "
  207. 2160 print#4,spc(w2)"   1   "
  208. 2170 print#4,spc(w2)"   1   "
  209. 2180 print#4,spc(w2)" 11111 "
  210. 2190 return
  211. 2200 w2=16+7*f
  212. 2210 print#4,spc(w2)"  222  "
  213. 2220 print#4,spc(w2)" 2   2 "
  214. 2230 print#4,spc(w2)"     2 "
  215. 2240 print#4,spc(w2)"    2  "
  216. 2250 print#4,spc(w2)"   2   "
  217. 2260 print#4,spc(w2)"  2    "
  218. 2270 print#4,spc(w2)" 22222 "
  219. 2280 return
  220. 2290 w2=16+7*f
  221. 2300 print#4,spc(w2)"  333  "
  222. 2310 print#4,spc(w2)" 3   3 "
  223. 2320 print#4,spc(w2)"     3 "
  224. 2330 print#4,spc(w2)"   33  "
  225. 2340 print#4,spc(w2)"     3 "
  226. 2350 print#4,spc(w2)" 3   3 "
  227. 2360 print#4,spc(w2)"  333  "
  228. 2370 return
  229. 2380 w2=16+7*f
  230. 2390 print#4,spc(w2)"    4  "
  231. 2400 print#4,spc(w2)"   44  "
  232. 2410 print#4,spc(w2)"  4 4  "
  233. 2420 print#4,spc(w2)" 4  4  "
  234. 2430 print#4,spc(w2)" 44444 "
  235. 2440 print#4,spc(w2)"    4  "
  236. 2450 print#4,spc(w2)"    4  "
  237. 2460 return
  238. 2470 w2=16+7*f
  239. 2480 print#4,spc(w2)" 55555 "
  240. 2490 print#4,spc(w2)" 5     "
  241. 2500 print#4,spc(w2)" 5     "
  242. 2510 print#4,spc(w2)"  555  "
  243. 2520 print#4,spc(w2)"     5 "
  244. 2530 print#4,spc(w2)"     5 "
  245. 2540 print#4,spc(w2)" 5555  "
  246. 2550 return
  247. 2560 w2=16+7*f
  248. 2570 print#4,spc(w2)"  666  "
  249. 2580 print#4,spc(w2)" 6   6 "
  250. 2590 print#4,spc(w2)" 6     "
  251. 2600 print#4,spc(w2)" 6666  "
  252. 2610 print#4,spc(w2)" 6   6 "
  253. 2620 print#4,spc(w2)" 6   6 "
  254. 2630 print#4,spc(w2)"  666  "
  255. 2640 return
  256. 2650 w2=16+7*f
  257. 2660 print#4,spc(w2)" 77777 "
  258. 2670 print#4,spc(w2)"     7 "
  259. 2680 print#4,spc(w2)"     7 "
  260. 2690 print#4,spc(w2)"    7  "
  261. 2700 print#4,spc(w2)"   7   "
  262.